<template>
  <div>
    <div class="bg_fff full-w p_20 listbody">
      <div class="header c_000 mb_20">操作日志</div>
      <el-form
        :inline="true"
        :model="queryParams"
        label-width="0"
        class="flexrowbetween"
      >
        <div>
          <el-form-item label="" prop="active">
            <el-select style="width:160px"
              v-model="queryParams.active"
              clearable
              @change="handleQuery"
              placeholder="全部活动"
            >
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="" prop="ip">
            <el-input style="width:160px"
              v-model="queryParams.ip"
              clearable
              @keyup.enter.native="handleQuery"
              placeholder="搜索IP地址"
            ></el-input>
          </el-form-item>
          <el-form-item label="" prop="keyword">
            <el-input style="width:160px"
              v-model="queryParams.keyword"
              clearable
              @keyup.enter.native="handleQuery"
              placeholder="请输入内容"
            ></el-input>
          </el-form-item>
          <el-form-item prop="day">
            <el-date-picker
              v-model="times"
              type="daterange"
              value-format="yyyy-MM-dd"
              start-placeholder="开始日期"
              end-placeholder="结束日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="handleQuery">查询</el-button>
          </el-form-item>
        </div>
      </el-form>
      <el-table :data="tableData" class="commtable" style="width: 100%">
        <el-table-column
          prop="date"
          align="center"
          label="操作用户"
          width="200"
        >
          <template slot-scope="scope">
            <img src="" alt="" class="avatar" />
            <div class="f-13 c_000">{{ scope.row.username || "用户名" }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="date" align="center" label="操作IP">
          <template slot-scope="scope">
            <span>{{ scope.row.rewordname || "谢谢惠顾" }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="date" align="center" label="操作时间">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="date" align="center" label="操作行为">
          <template slot-scope="scope">
            <el-tag type="success" class="tag_success"
              >{{ scope.row.status }}已核销</el-tag
            >
            <!-- <el-tag type="danger" class="tag_danger">未核销</el-tag> -->
            <!-- <el-tag type="info" class="tag_info">未发布</el-tag>
            <el-tag type="warning" class="tag_warning">已结束</el-tag> -->
          </template>
        </el-table-column>
        <el-table-column prop="date" align="center" label="操作详情" width="360px">
          <template slot-scope="scope">
            <span>6号盘修改xxx{{scope.row.detail}}</span>
          </template>
        </el-table-column>
      </el-table>
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.page"
        :limit.sync="queryParams.num"
        @pagination="getList"
      />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      times:'',
      tableData: [{ id: 1, username: "次数次数" }],
      total: 10,
      queryParams: {
        page: 1,
        num: 10,
      },
    };
  },
  mounted() {
    this.getList();
  },
  methods: {
    getList() {},

    handleQuery() {
      this.queryParams.page = 1;
      this.getList();
    },
  },
};
</script>
<style lang="scss" scoped>
.listbody {
  height: calc(100vh - 90px);
  overflow-y: auto;
  padding-bottom: 25px;
}
.header {
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}
</style>